// vim:set tabstop=4 shiftwidth=4 softtabstop=4 expandtab foldcolumn=1 foldmethod=marker foldclose=all:
/**
 * Project: 5anet
 * File:    src/com/m5anet/tag/SetEnvExtraInfo.java
 *
 * This is a ExtraInfo Class for SetEnv.
 *
 * This Class will generate one variable into the page.
 * so, the Usage: <my:tag name="name" id="idname"/>
 *
 * Author:      $Author: hylinux $
 * Date:        $Date: 2008-01-23 02:18:46 +0000 (Wed, 23 Jan 2008) $
 * Reversion:   $Rev: 13 $
 * Id:          $Id: SetEnvExtraInfo.java 13 2008-01-23 02:18:46Z hylinux $ 
 */
package com.m5anet.tag;

import javax.servlet.jsp.JspException;
import javax.servlet.jsp.tagext.TagExtraInfo;
import javax.servlet.jsp.tagext.TagData;
import javax.servlet.jsp.tagext.VariableInfo;


public class SetEnvExtraInfo extends TagExtraInfo {
    
    public VariableInfo[] getVariableInfo(TagData data) {
        String variableName = (String)data.getAttribute("id");

        VariableInfo myVariableInfo = new VariableInfo(variableName, 
                "String", true, VariableInfo.AT_END);

        VariableInfo[] myTagVariable = new VariableInfo[1];

        myTagVariable[0] = myVariableInfo;
        
        return myTagVariable;  
    }
}

